//
//	DietActionDetailDietFoodList.swift
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation 
import ObjectMapper


class DietActionDetailDietFoodList : NSObject, NSCoding, Mappable{

	var createTime : String?
	var createUser : Int?
	var dietId : Int?
	var foodCalorie : String?
	var foodCalorieStandard : String?
	var foodId : Int?
	var foodName : String?
	var foodType : String?
	var foodUrl : String?
	var foodWeight : Int?
	var id : Int?
	var isDeleted : Int?
	var sort : Int?
	var updateTime : String?
	var updateUser : Int?
	var version : Int?


	class func newInstance(map: Map) -> Mappable?{
		return DietActionDetailDietFoodList()
	}
	required init?(map: Map){}
	private override init(){}

	func mapping(map: Map)
	{
		createTime <- map["createTime"]
		createUser <- map["createUser"]
		dietId <- map["dietId"]
		foodCalorie <- map["foodCalorie"]
		foodCalorieStandard <- map["foodCalorieStandard"]
		foodId <- map["foodId"]
		foodName <- map["foodName"]
		foodType <- map["foodType"]
		foodUrl <- map["foodUrl"]
		foodWeight <- map["foodWeight"]
		id <- map["id"]
		isDeleted <- map["isDeleted"]
		sort <- map["sort"]
		updateTime <- map["updateTime"]
		updateUser <- map["updateUser"]
		version <- map["version"]
		
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required init(coder aDecoder: NSCoder)
	{
         createTime = aDecoder.decodeObject(forKey: "createTime") as? String
         createUser = aDecoder.decodeObject(forKey: "createUser") as? Int
         dietId = aDecoder.decodeObject(forKey: "dietId") as? Int
         foodCalorie = aDecoder.decodeObject(forKey: "foodCalorie") as? String
         foodCalorieStandard = aDecoder.decodeObject(forKey: "foodCalorieStandard") as? String
         foodId = aDecoder.decodeObject(forKey: "foodId") as? Int
         foodName = aDecoder.decodeObject(forKey: "foodName") as? String
         foodType = aDecoder.decodeObject(forKey: "foodType") as? String
         foodUrl = aDecoder.decodeObject(forKey: "foodUrl") as? String
         foodWeight = aDecoder.decodeObject(forKey: "foodWeight") as? Int
         id = aDecoder.decodeObject(forKey: "id") as? Int
         isDeleted = aDecoder.decodeObject(forKey: "isDeleted") as? Int
         sort = aDecoder.decodeObject(forKey: "sort") as? Int
         updateTime = aDecoder.decodeObject(forKey: "updateTime") as? String
         updateUser = aDecoder.decodeObject(forKey: "updateUser") as? Int
         version = aDecoder.decodeObject(forKey: "version") as? Int

	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc func encode(with aCoder: NSCoder)
	{
		if createTime != nil{
			aCoder.encode(createTime, forKey: "createTime")
		}
		if createUser != nil{
			aCoder.encode(createUser, forKey: "createUser")
		}
		if dietId != nil{
			aCoder.encode(dietId, forKey: "dietId")
		}
		if foodCalorie != nil{
			aCoder.encode(foodCalorie, forKey: "foodCalorie")
		}
		if foodCalorieStandard != nil{
			aCoder.encode(foodCalorieStandard, forKey: "foodCalorieStandard")
		}
		if foodId != nil{
			aCoder.encode(foodId, forKey: "foodId")
		}
		if foodName != nil{
			aCoder.encode(foodName, forKey: "foodName")
		}
		if foodType != nil{
			aCoder.encode(foodType, forKey: "foodType")
		}
		if foodUrl != nil{
			aCoder.encode(foodUrl, forKey: "foodUrl")
		}
		if foodWeight != nil{
			aCoder.encode(foodWeight, forKey: "foodWeight")
		}
		if id != nil{
			aCoder.encode(id, forKey: "id")
		}
		if isDeleted != nil{
			aCoder.encode(isDeleted, forKey: "isDeleted")
		}
		if sort != nil{
			aCoder.encode(sort, forKey: "sort")
		}
		if updateTime != nil{
			aCoder.encode(updateTime, forKey: "updateTime")
		}
		if updateUser != nil{
			aCoder.encode(updateUser, forKey: "updateUser")
		}
		if version != nil{
			aCoder.encode(version, forKey: "version")
		}

	}

}